package com.activeshare.edu.ucenter.common.messages;

import java.io.Serializable;

public class Message implements Serializable {

	private String result;//0成功  1 失败
	/**
	 * 	error code 
	 */	
	private String errorCode;// 错误编码
	
	private String errorMessage;//错误消息
	
	private Object data;

	public Message(){	}
	
	public Message(String result){
		this(result, null);
	}
	
	public static Message newMessage(String result){
		return new Message(result);
	}
	
	public static Message newMessage(String result, String errorMessage){
		return new Message(result, errorMessage);
	}
	
	public Message(String result, String errorMessage){
		this(result, errorMessage, null);
	}	
	
	public Message(String result, String errorMessage, String errorCode){
		this.result = result;
		this.errorMessage = errorMessage;
		this.errorCode = errorCode;
	}
	
	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
}